package com.top.ruizhong.main.notice

import com.blankj.utilcode.util.ConvertUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.module.lemlin.base.BaseAbstractFragment
import com.module.lemlin.custom.SpacingItemDecoration
import com.top.ruizhong.R
import kotlinx.android.synthetic.main.fragment_message_mutual.*

class MessageMutualFragment : BaseAbstractFragment() {


    companion object {
        fun newInstance(): MessageMutualFragment {
            return MessageMutualFragment()
        }
    }

    private val messageAdapter =
        object : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_message_mutual) {
            override fun convert(holder: BaseViewHolder, item: String) {

            }
        }

    override val layoutResId: Int
        get() = R.layout.fragment_message_mutual

    override fun initView() {
        rvMessageMutualBody.apply {
            val decoration = SpacingItemDecoration(
                vGap = ConvertUtils.dp2px((15f)),
                hGap = ConvertUtils.dp2px((15f))
            )
            addItemDecoration(decoration)
        }.adapter = messageAdapter
    }

    override fun initData() {
        val videos: MutableList<String> = mutableListOf()
        for (index in 0..10) {
            videos.add(index.toString())
        }
        messageAdapter.setNewInstance(videos)
    }

}